<?php
session_start();
//ini_set('display_errors',1);
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/database.php');
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/functions.php');
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/class.admin.php');
$admin = new admin();
$admin->canView($_SERVER['PHP_SELF']);

ob_start("sanitize_output"); 
$criteria=array('form_name'=>$_POST['form_name'],'button_waiting_value'=>$_POST['form_button_waiting_value'],'method'=>$_POST['form_method'],'enctype'=>$_POST['form_enctype'],'inline'=>intval($_POST['form_inline']),'can_delete'=>intval(1));//base64_encode();
$id=$admin->addNewForm($criteria);

?>
<script>
$("#forms-click").click();
</script>